<html> 
<head>
<style>
   .modra{background-color:blue;}
   .oranz{background-color:orange;}
   .ruz {background-color:pink;}
   .cer{color:red;}
</style>     
</head>               
<body>

<?php     
$pole = array("0"=>"dsadsa","1"=>"a","2"=>6,"3"=>2,"4"=>5,"5"=>8);
$l=0;
echo "<br>1.ukol <br>";
foreach ($pole as $k)
{  

echo $k ;
echo "<br>";                
} 
echo "2. ukol<br>"; 
foreach ($pole as $k)
{  
   if($k > 5)
   {
   echo "<div class=\"ruz\">". $k."</div>";
   }
   
   }
    echo "<br>"; 
    echo "3. ukol<br>"; 
   foreach ($pole as $k)
{  

 if (is_string($k)) {
   if (strlen($k)==1) {
   
      echo "<div class=\"cer\">". $k."</div>"; $l=$l+1; }
               
   
   else{echo "<div>".$k;$l=$l+strlen($k);}
   echo "</div>";     
   
   }                
}                                             
echo "4. ukol<br>"; 
 foreach ($pole as $k)
{  
   if(is_int($k))
    $polecisel[count($polecisel)]=$k;
   }
sort($polecisel);

echo "<br>";
 echo "<table border=1>";
 foreach ($polecisel as $k)
{  
   if($k > 5)
   {
   echo "<tr><td class=\"ruz\">". $k."</td></tr>";
   }
  else    {  echo "<tr><td>". $k."</td></tr>";}$p=$p+1;
   }  
   
echo "</table>" ;
echo "<br>";
echo "<br>";
echo "5. ukol<br>"; 
echo $polecisel[0];
  echo "<br>6. ukol<br>"; 

echo $polecisel[count($polecisel)-1];
echo "<br>7. ukol<br>";
echo count($pole);   echo "<br>";
echo $l;    echo "<br>";
echo $p;     echo "<br>";
?>
</body>
</html>  

